﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TecBaseObjects.Interfaces;

namespace TecBaseObjects.Objects {

    public class TecUserObj : IBaseObject {

        #region Members

        private int userID;
        private string vorname;
        private string nachname;
        private string loginName;
        private bool gesperrt;
        private byte workingLevel;
        private DateTime validTo;
        private DateTime loginTime;
        private string computerName;
        private string email;

        #endregion

        #region Constructor

        public TecUserObj(int userID, string vorname, string nachname, string loginName, bool gesperrt, byte workingLevel, DateTime validTo) {
            this.userID = userID;
            this.vorname = vorname;
            this.nachname = nachname;
            this.loginName = loginName;
            this.gesperrt = gesperrt;
            this.workingLevel = workingLevel;
            this.validTo = validTo;

            this.computerName = Environment.MachineName;
        }

        #endregion

        #region Properties

        public string ComputerName {
            get { return this.computerName; }
        }

        public string EMail {
            get { return this.email; }
            set { this.email = value; }
        }

        public bool Gesperrt {
            get { return this.gesperrt; }
            set { this.gesperrt = value; }
        }

        public string LoginName {
            get { return this.loginName; }
            set { this.loginName = value; }
        }

        public DateTime LoginTime {
            get { return this.loginTime; }
            set { this.loginTime = value; }
        }

        public string Nachname {
            get { return this.nachname; }
            set { this.nachname = value; }
        }

        public int UserID {
            get { return this.userID; }
            set { this.userID = value; }
        }

        public string UserName {
            get { return this.Vorname + ' ' + this.Nachname; }
        }

        public DateTime ValidTo {
            get { return this.validTo; }
            set { this.validTo = value; }
        }

        public string Vorname {
            get { return this.vorname; }
            set { this.vorname = value; }
        }

        public byte WorkingLevel {
            get { return this.workingLevel; }
            set { this.workingLevel = value; }
        }

        #endregion

    }
}
